<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>首页</title>
</head>
<body>
<table border="1" align="center">
    <tr align="center">

        <td colspan="10"><h2>用户信息表</h2>
            <a href="${pageContext.request.contextPath}/user/add"><h2>添加信息</h2></a>
        </td>
    </tr>
    <tr align="center">
        <th>id</th>
        <th>编码</th>
        <th>名称</th>
        <th>邮件</th>
        <th>null</th>
        <th>创建者</th>
        <th>创建时间</th>
        <th>更新者</th>
        <th>修改时间</th>
        <th>操作</th>
    </tr>
    <c:forEach var="u" items="${pageUtil.lists}">
        <tr align="center">
            <td>${u.id}</td>
            <td>${u.devCode}</td>
            <td>${u.devName}</td>
            <td>${u.devEmail}</td>
            <td>${u.devInfo}</td>
            <td>${u.createdBy}</td>
            <td>
                <fmt:formatDate value="${u.creationDate}" type="both"/>
            </td>
            <td>${u.modifyBy}</td>
            <td>
                <fmt:formatDate value="${u.modifyDate}" type="both"/>
            </td>
            <td>

                <a href="${pageContext.request.contextPath}/user/del/${u.id}">删除</a>
                <a href="${pageContext.request.contextPath}/user/show/${u.id}">修改</a>
            </td>
        </tr>
    </c:forEach>
    <tr align="center">
        <td colspan="11">
            当前页[${pageUtil.pageindex}/${pageUtil.pagecount}]
            <c:if test="${pageUtil.pageindex>1}">
                <a href="${pageContext.request.contextPath}/user/getPage?pageIndex=1">首页</a>
                <a href="${pageContext.request.contextPath}/user/getPage?pageIndex=${pageUtil.pageindex-1}">上一页</a>
            </c:if>
            <c:if test="${pageUtil.pageindex<pageUtil.pagecount}">
                <a href="${pageContext.request.contextPath}/user/getPage?pageIndex=${pageUtil.pageindex+1}">下一页</a>
                <a href="${pageContext.request.contextPath}/user/getPage?pageIndex=${pageUtil.pagecount}">尾页</a>
            </c:if>
        </td>
    </tr>
</table>
</body>
</html>
